package com.wangrui.quartz.schedule;

import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;
//需要时打开注释
//@Component
public class Task1 {

    /**
     * spring自带调度器，不依赖quartz
     */
    @Scheduled(cron = "0/3 * * * * ?")
    public void print(){
        System.out.println("Task1.print:" + new Date());
    }
}
